// DlgButton.cpp : implementation file
//

#include "stdafx.h"
#include "PanImage.h"
#include "DlgButton.h"


// CDlgButton dialog

IMPLEMENT_DYNAMIC(CDlgButton, CMyDlg)

CDlgButton::CDlgButton(CWnd* pParent /*=NULL*/)
	: CMyDlg(CDlgButton::IDD, pParent)
{

}

CDlgButton::~CDlgButton()
{
}

void CDlgButton::DoDataExchange(CDataExchange* pDX)
{
	CMyDlg::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CDlgButton, CMyDlg)
	ON_BN_CLICKED(IDC_CHECK_ImageShow, OnBnClickedCheckImageshow)
END_MESSAGE_MAP()

void CDlgButton::OnBnClickedCheckImageshow()
{
	if (((CButton*)GetDlgItem(IDC_CHECK_ImageShow))->GetCheck())
	{
		g.nImageViewMode = eShowStaitc;
		g.DlgTool[g.nWorkMode]->EnableStaticControl(eShowDynamic==g.nImageViewMode ? FALSE:TRUE);
		g.DlgTool[g.nWorkMode]->EnableDynamicControl(eShowDynamic==g.nImageViewMode ? TRUE:FALSE);
 	}
	else
	{
		g.nImageViewMode = eShowDynamic;
		g.DlgTool[g.nWorkMode]->EnableStaticControl(eShowDynamic==g.nImageViewMode ? FALSE:TRUE);
		g.DlgTool[g.nWorkMode]->EnableDynamicControl(eShowDynamic==g.nImageViewMode ? TRUE:FALSE);
	}
	g.ViewTool->ImageBrowse(((CButton*)GetDlgItem(IDC_CHECK_ImageShow))->GetCheck());
}

